import java.util.*;

public class String_Length{
    public static void main(String[] args){
        System.out.print("Enter the String: ");
        Scanner n = new Scanner(System.in);
        String str = new String();
        str = n.nextLine();
        System.out.println("You Entered: " + str);
        int len = str.length();
        System.out.println("The Length of the String: " + len + " characters..");
        System.out.println("Using Loop..");
        len = 0;
        for(int i = 0; str[i] != '\0'; i++){
            len++;
        }
        System.out.println("The Length of the String: " + len + " characters..");
    }
}